Skip to content

Conversation

nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Jun 19, 2025

No description provided.

Copy link

vercel bot commented Jun 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hypergraph-connect ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 1:31pm
hypergraph-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 19, 2025 1:31pm

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the listing of public spaces by adding a new hook (useSpaces) that fetches space data from a GraphQL endpoint and integrates it into the events route. Key changes include:

  • Exporting and implementing the new hook useSpaces.
  • Using the new hook in the events route to render public spaces.
  • Adjusting QueryClientProvider usage in Hypergraph contexts.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/hypergraph-react/src/index.ts Added export for the new useSpaces hook.
packages/hypergraph-react/src/hooks/use-spaces.ts Implements the useSpaces hook to query public spaces.
packages/hypergraph-react/src/HypergraphSpaceContext.tsx Removed QueryClientProvider wrapping to update context setup.
packages/hypergraph-react/src/HypergraphAppContext.tsx Integrated QueryClientProvider to wrap RepoContext.
apps/events/src/routes/index.tsx Integrated the new useSpaces hook for displaying public spaces.
Comments suppressed due to low confidence (2)

packages/hypergraph-react/src/hooks/use-spaces.ts:34

  • Using a hard-coded accountAddress limits flexibility; consider parameterizing this value to support multiple accounts or dynamic testing configurations.
        accountAddress: '0xBE0298aF8D440bEFA78E7e8A538D8ecBFF06bfC7',

packages/hypergraph-react/src/HypergraphSpaceContext.tsx:44

  • The removal of QueryClientProvider in this context means that hooks relying on react-query must inherit the client from an upper component. Ensure that the intended design provides a consistent QueryClient instance across the application.
  return <HypergraphReactContext.Provider value={current}>{children}</HypergraphReactContext.Provider>;

@nikgraf nikgraf force-pushed the ng/listing-public-spaces branch from 9d1b504 to 3cca8b3 Compare June 19, 2025 13:29
@nikgraf nikgraf merged commit 03f1d51 into main Jun 19, 2025
7 checks passed
@nikgraf nikgraf deleted the ng/listing-public-spaces branch June 19, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant